Skip to content

ci: collect all failures in Linux and macOS standard-library jobs, reconfigure runner streams - #756

Open
abnalstlll-byte wants to merge 1 commit into
ProjectLeonida:mainfrom
abnalstlll-byte:feat/pipeline-ci-resilience
Open

abnalstlll-byte wants to merge 1 commit into
ProjectLeonida:mainfrom
abnalstlll-byte:feat/pipeline-ci-resilience

Conversation

@abnalstlll-byte

Copy link
Copy Markdown
Contributor

Summary

  • In .github/workflows/ci.yml, update stdlib-tests-linux and macos-python jobs to collect all failed files in failed+=("$t") and emit ::error file=$t::$t failed before exiting non-zero (mirroring the Windows check job), preventing early-exit from concealing downstream test failures.
  • In macos-python, ensures the background semantic discover job is reliably waited on and its log output printed even when standard-library test files fail.
  • In scripts/run_semantic_tests.py and scripts/run_wine_tests.py, adds sys.stderr.reconfigure(errors="replace") under if __name__ == "__main__": so redirected streams on strict ANSI code pages under python -I handle unencodable characters gracefully without raising UnicodeEncodeError.
  • Adds regression unit tests in tests/test_ci_registration.py (asserting Linux and macOS jobs collect all failures), tests/test_run_semantic_tests.py, and tests/test_run_wine_tests.py.

Verification

  • python -I tests/test_ci_registration.py PASS (17 tests in 12.4s).
  • python -I tests/test_run_wine_tests.py PASS (64 tests in 2.3s).
  • python -I tests/test_run_semantic_tests.py PASS (20 tests in 10.4s).
  • python -I tests/test_runner_calls_all_tests.py PASS (3 tests in 2.3s).
  • python -I scripts/check_no_game_data.py clean (0 matches, 100% clean-room compliant).
  • All modified files verified LF line endings.

AI-assisted.

@KernelSmoker KernelSmoker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent Linux verification of PR head b1fdeea259ba5bb8c1cb204eceaab2954f0fc08c on base 2d73c242fddfe26d57b52ee150704e6c3b23cff4: tests/test_ci_registration.py passed 15/15, tests/test_run_semantic_tests.py 19/19, and tests/test_run_wine_tests.py 63/63. py_compile for the changed Python files and git diff --check also passed. The semantic-runner unit suite intentionally launches a failing fixture to test failure reporting; the suite itself passed.

No GPU or game data used. At the latest hosted-check refresh, label, Linux GPU tools, Windows, macOS, jactionlint, no-game-data, and change-scope checks were still queued. AI-assisted independent verification.

@abnalstlll-byte
abnalstlll-byte force-pushed the feat/pipeline-ci-resilience branch from b1fdeea to f9af30b Compare November 25, 2026 21:52
@abnalstlll-byte

Copy link
Copy Markdown
Contributor Author

Rebased onto latest \main\ (resolving conflict in \ ests/test_run_semantic_tests.py\ with newly merged parallel interrupt test cases).
Verified \ ests/test_ci_registration.py\ (18/18 passed), \ ests/test_run_semantic_tests.py\ (27/27 passed), \scripts/check_no_game_data.py\ (clean), and \git diff --check.

AI-assisted (Claude Code, Claude Opus 5.5).

@EdenBendheim

Copy link
Copy Markdown
Contributor

Note

🤖 gpt-6.2-sol responding on behalf of EdenBendheim

Independent macOS 27.3 / Python 3.12.14 verification of head f9af30b85429372daed10312ab1094c4d110708e merged locally with main a73a57e13: CI registration 18/18, semantic-runner tests 27/27, Wine-runner tests 73/73, no-game-data and diff checks passed. CPU-only synthetic fixtures.

One remaining issue directly affects complete failure reporting in both changed steps: each python -I "$t" inherits the file-selection stream from the shell loop.

I ran each actual workflow step on a synthetic tree with three standalone files (fail, pass, fail) and a passing semantic fixture. Both steps correctly reported both failures and the Mac step printed its semantic log. When the first file also calls sys.stdin.read(), both steps instead execute only the first file and silently omit the subsequent pass/fail files.

This is pre-existing, not introduced by your PR; we saw the same issue in the full serial benchmark for #2193. I verified that changing the child invocation to python -I "$t" </dev/null || failed+=("$t") in both loops makes the three-file fixture execute all three and report both failures. A small regression using an stdin-reading test would cover it.

@MoonEyes

Copy link
Copy Markdown
Collaborator

Hi @abnalstlll-byte, thanks for this pull request.

CONTRIBUTING.md asks contributors to claim their work in the coordination issue ("Coordinating who works on what", currently #1608) before opening a pull request: post claiming: <ID> there, or a one-line description if the item is not listed yet, and put the ID in the pull request. I could not find a claim from you for this one.

The claim matters because "it is claimed in the coordination issue by the pull request's author" is the first item on the maintainers' checklist for a mergeable pull request, and because it lets others see that the work is taken before they write it a second time.

Could you post the claim in #1608 and put its ID (or a link to it) on the pull request's "Claimed in the coordination issue as:" line? If you already claimed it in another form, a link to your comment is enough.

AI-assisted (Claude Code, Claude Opus 5.5).

@zmasi

zmasi commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

#756 | head f9af30b (merged cleanly with main adfb382) | python -I tests/test_ci_registration.py + python -I tests/test_run_semantic_tests.py + python -I tests/test_run_wine_tests.py + Windows cp1252 redirected-pipe python -I probes | red on main: FAILED (failures=2) in test_ci_registration.py (Linux and macOS stdlib loops exited on the first failure instead of collecting failed+=("$t")), and redirected stderr under python -I on Windows cp1252 emitted \u4e2d\u6587 (backslashreplace) instead of ? (errors="replace") while run_wine_tests.py left redirected stdout in strict cp1252 | green on PR+main: 20 ran, OK (test_ci_registration.py under Git for Windows bash), 34 ran, OK (skipped=1) (test_run_semantic_tests.py), 79 ran, OK (skipped=13) (test_run_wine_tests.py), and Windows cp1252 redirected pipes cleanly replaced non-ANSI codepoints with ? | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yes

Audited f9af30b854 (.github/workflows/ci.yml, scripts/run_semantic_tests.py, scripts/run_wine_tests.py, and their 3 test suites) on Windows 11, confirming both Linux and macOS stdlib workflow loops collect all failing files into failed=() with ::error file=$t:: annotations and that sys.stdout.reconfigure(errors="replace") + sys.stderr.reconfigure(errors="replace") take effect on Windows strict cp1252 pipes under python -I. Also verified tests/test_text_write_line_endings.py, tests/test_docs_encoding.py, and scripts/check_no_game_data.py.

@OreoFR

OreoFR commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

Verified by OreoFR

  • Base: main 829530dbd + PR head f9af30b85 (tested as a merge)
  • Test: python -I tests/test_ci_registration.py, tests/test_run_semantic_tests.py, tests/test_run_wine_tests.py
  • Red on main: test_ci_registration: 2 FAIL (test_linux_stdlib_step_collects_all_failures, test_macos_stdlib_step_collects_all_failures); the two runner tests already pass on main (35 OK, 79 OK)
  • Green with the PR: 20 OK, 35 OK (1 skip), 79 OK (13 skips, Linux-only cases)
  • Verdict: READY (none of its files changed on main since; merges without conflict on 5825b02ff)
  • Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11

macOS run (POSIX-only tests skipped on Windows)

Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main 59e6584, PR head f9af30b : red 2 failures (test_ci_registration) / green 134 OK, 1 skipped

The PR's test files are older than main's (merge base ~3300 commits behind), so the raw red gives false failures. Red below = the merged test files against main's code (same tree as git merge-tree, clean).

  • tests/test_run_wine_tests.py: red 80 OK / green 80 OK. Skipped on Mac: 0 — the 13 tests skipped on Windows (skipIf(os.name == "nt") dosdevices class, skipUnless(os.name == "posix") process-group / fake wineserver / symlink tests) all run and pass. MainTest.test_cli_help_under_python_isolated already passes on main (the fix targets the Windows ANSI code page), so no red on Mac.
  • tests/test_ci_registration.py: red 20 tests, 2 failures (StdlibLoopTest.test_linux_stdlib_step_collects_all_failures, StdlibLoopTest.test_macos_stdlib_step_collects_all_failures) / green 20 OK.
  • tests/test_run_semantic_tests.py: red 35 OK / green 35 OK, 1 skipped both sides (test_windows_cancellation_stops_descendants, requires Windows taskkill). test_cli_reconfigures_streams_cleanly already passes on main.
  • (MEASURED n=3) the 2 red failures rerun alone 3 times: red 3/3 fail, green 3/3 pass.

Verdict for the macOS part: READY

AI-assisted (Claude Code, Claude Opus 5.5).

@OreoFR

OreoFR commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Independent re-verification by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS, Python 3.12.16, main 7bbc1d2, PR head f9af30b (unchanged) : red 2 failures / green 135 OK + 1 skipped

  • Merge: clean (git merge-tree); does not force a rebase of [integration] PageMirror, GPU detile, async queue & RDNA2->SPIR-V performance stack (INTEGRATION-PERF-CPU-GPU-R6) #2566 (1d0867c).
  • The PR's test files are older than main's, so red = the merged test files against main's code.
  • tests/test_ci_registration.py: red 20 tests, 2 failures (StdlibLoopTest.test_linux_stdlib_step_collects_all_failures, StdlibLoopTest.test_macos_stdlib_step_collects_all_failures); green 20/20 OK.
  • tests/test_run_wine_tests.py: 80/80 OK on both sides, 0 skipped on macOS (the POSIX-only tests skipped on Windows run here).
  • tests/test_run_semantic_tests.py: 35 OK on both sides, 1 skipped (test_windows_cancellation_stops_descendants, needs Windows taskkill). The FAIL: test_a (test_f.T.test_a) line in its output is a fixture subprocess, not a real failure.
  • Same result as my earlier run on 59e6584.
  • Note for maintainers: this PR edits .github/workflows/ci.yml, so it needs the human approval the rules require for CI changes.

Verdict: READY (tests); CI change → human approval.

AI-assisted: Claude Code

@github-actions github-actions Bot added the needs rebase Conflicts with the base branch: rebase it on main label Nov 30, 2026

@aslan2142 aslan2142 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes because the workflow portion of this PR has been superseded on main:

  1. Obsolete & conflicting workflow hunks: On current main, .github/workflows/ci.yml has removed macos-python and updated Tests (standard library only, Linux) (lines 195–203) to pipe into python -I scripts/run_standalone_tests.py -j 4, which already collects and reports all failures. The .github/workflows/ci.yml and tests/test_ci_registration.py hunks now conflict and are no longer needed.
  2. Still-relevant scope: Reconfiguring sys.stdout/sys.stderr with errors="replace" in scripts/run_semantic_tests.py and scripts/run_wine_tests.py is not yet on main and remains useful.

Please rebase onto main, drop the superseded .github/workflows/ci.yml and tests/test_ci_registration.py changes (keeping the runner stream-reconfiguration fix and tests), and run CI to green.

(AI-assisted review.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase Conflicts with the base branch: rebase it on main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants